.class public Lcom/fiberhome/upload/c/b;
.super Ljava/lang/Object;


# direct methods
.method public static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyyMMddHHmmssSSS"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    new-instance v1, Ljava/lang/StringBuffer;

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuffer;-><init>(Ljava/lang/String;)V

    const-string/jumbo v0, "_"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/fiberhome/gaea/client/c/b;->m()Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/gaea/client/c/b;->m()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x8

    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v1, p0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static a(Landroid/content/Context;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V
    .locals 6

    new-instance v4, Ljava/text/SimpleDateFormat;

    const-string/jumbo v0, "yyyy-MM-dd HH:mm:ss SSS"

    invoke-direct {v4, v0}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    new-instance v1, Lcom/waiqin365/lightapp/kehu/b/o;

    invoke-direct {v1}, Lcom/waiqin365/lightapp/kehu/b/o;-><init>()V

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/waiqin365/base/login/mainview/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v2

    invoke-virtual {v2, p0}, Lcom/waiqin365/base/login/mainview/a;->n(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    const-string/jumbo v3, "/fhUpload/"

    invoke-virtual {v2, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v3, "/fhUpload/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    :cond_0
    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    iput-object p3, v1, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    const-string/jumbo v0, ""

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/o;->e:Ljava/lang/String;

    invoke-static {p0}, Lcom/fiberhome/upload/b/b;->a(Landroid/content/Context;)Lcom/fiberhome/upload/b/b;

    move-result-object v0

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    iput-object v2, v0, Lcom/fiberhome/upload/b/b;->a:Ljava/lang/String;

    invoke-virtual {v0, p0}, Lcom/fiberhome/upload/b/b;->b(Landroid/content/Context;)V

    const-string/jumbo v0, ""

    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    const-string/jumbo v3, "uploadDir"

    iget-object v5, v1, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    invoke-virtual {v2, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "uploadHandler"

    iget-object v5, v1, Lcom/waiqin365/lightapp/kehu/b/o;->e:Ljava/lang/String;

    invoke-virtual {v2, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "tenantId"

    iget-object v5, v1, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    invoke-virtual {v2, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "cmId"

    iget-object v5, v1, Lcom/waiqin365/lightapp/kehu/b/o;->c:Ljava/lang/String;

    invoke-virtual {v2, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "code"

    iget-object v1, v1, Lcom/waiqin365/lightapp/kehu/b/o;->f:Ljava/lang/String;

    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    move-object v3, v0

    :goto_0
    if-eqz p1, :cond_2

    if-eqz p2, :cond_2

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_2

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_2

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    if-ne v0, v1, :cond_2

    const/4 v0, 0x0

    move v2, v0

    :goto_1
    if-eqz p1, :cond_2

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v2, v0, :cond_2

    invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v1

    if-eqz v1, :cond_1

    :goto_2
    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto :goto_1

    :catch_0
    move-exception v1

    move-object v3, v0

    goto :goto_0

    :cond_1
    new-instance v5, Lcom/fiberhome/upload/b/a;

    invoke-direct {v5}, Lcom/fiberhome/upload/b/a;-><init>()V

    invoke-interface {p2, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    iput-object v1, v5, Lcom/fiberhome/upload/b/a;->a:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v5, Lcom/fiberhome/upload/b/a;->b:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/io/File;->length()J

    move-result-wide v0

    iput-wide v0, v5, Lcom/fiberhome/upload/b/a;->c:J

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

    move-result-object v0

    invoke-virtual {v4, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v5, Lcom/fiberhome/upload/b/a;->d:Ljava/lang/String;

    iput-object v3, v5, Lcom/fiberhome/upload/b/a;->e:Ljava/lang/String;

    invoke-static {p0}, Lcom/fiberhome/upload/a/d;->a(Landroid/content/Context;)Lcom/fiberhome/upload/a/d;

    move-result-object v0

    invoke-virtual {v0, v5}, Lcom/fiberhome/upload/a/d;->a(Lcom/fiberhome/upload/b/a;)Z

    goto :goto_2

    :cond_2
    return-void
.end method
